import React from 'react'
import { Table, Popup } from 'semantic-ui-react'
import { OptionImage } from 'components/memberTable'

export default ({ options, width }) => (
  <Table.Cell className="last-cell" width={width} collapsing textAlign="right">
    {options
      && options.map(opt => (
        <Popup
          trigger={<OptionImage className="options" src={opt.src} onClick={opt.action} />}
          content={opt.text}
          inverted
        />
      ))}
  </Table.Cell>
)
